import request from '@/utils/request'

export function listContract(query) {
  return request({
    url: '/system/contract/list',
    method: 'get',
    params: query
  })
}


export function getContract(id) {
  return request({
    url: '/system/contract/' + id,
    method: 'get'
  })
}

export function addContract(data) {
  return request({
    url: '/system/contract',
    method: 'post',
    data: data
  })
}

export function updateContract(data) {
  return request({
    url: '/system/contract',
    method: 'put',
    data: data
  })
}

export function delContract(ids) {
  return request({
    url: '/system/contract/' + ids,
    method: 'delete'
  })
}

export function getContractHistory(query) {
  return request({
    url: '/system/contractChange/list',
    method: 'get',
    params:query
  })
}

export function getContractCount(query) {
  return request({
    url: '/system/contract/getContractCount',
    method: 'get',
    params:query
  })
}

export function getContractCountTwo(query) {
  return request({
    url: '/system/contract/getContractCountTwo',
    method: 'get',
    params:query
  })
}





